@mixin overflow-ellipse {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

@mixin hover-large {
    transition: background-size .1s ease-in-out;
    &:hover {
        background-size: 150% 150%;
    }
}

@keyframes jump {
    0% {
        bottom: 8%;
    }
    100% {
        bottom: 3%;
    }
}

.index-wrapper {
    width: 100%;
    overflow: hidden;
    text-align: center;
    color: #666;
    em {
        //font-size: 22px;
        font-style: normal;
    }
    .index-btn-register {
        position: absolute;
        bottom: 30px;
        left: 50%;
        margin-left: -64px;
        padding-left: 28px;
        padding-right: 28px;
    }
    .carousel {
        position: relative;
        &-indicators {
            left: auto;
            right: 10%;
            margin-left: 0;
            width: auto;
        }
        .item {
            background-size: cover;
        }
        &-caption {
            top: 5%;
            left: 5%;
            z-index: 2;
            &.right-bottom {
                top: auto;
                left: auto;
                right: 10%;
                bottom: 6%;
                font-size: 16px;
            }
            h3 {
                font-size: 20px;
                text-align: left;
            }
        }
    }
    .logo {
        position: relative;
        display: table;
        width: 100%;
        color: white;
        background: url('../images/index/logo-bg.jpg') center;
        background-size: cover;
        &-inner {
            display: table-cell;
            vertical-align: middle;
        }
        h1 {
            font-weight: bold;
            letter-spacing: 5px;
        }
    }
    .search-container {
        .form-group {
            margin: 0 auto;
            width: 640px;
        }
        .input-group {
            width: 100%;
            &-addon {
                padding: 0;
                width: 6rem;
                height: 2.5rem;
                border: none;
                background: none;
            }
        }
        .dropdown {
            &-toggle {
                position: relative;
                @include button-variant($gray-6,
                    white,
                    #ccc);
                padding: .5rem .8rem;
                height: 2.5rem;
                width: 100%;
                border-radius: 0;
                font-size: 22px;
                font-size: 1.1rem;
                text-align: left;
                &:hover {
                    background-color: white;
                }
                .caret {
                    position: absolute;
                    top: 1.05rem;
                    right: .8rem;
                    border-width: .4rem;
                }
            }
            .dropdown-menu {
                margin-top: 0;
                width: 6rem;
                min-width: 6rem;
                border-radius: 0;
                font-size: 22px;
                font-size: 1.1rem;
                z-index: 6;
            }
        }
        .search-text {
            max-width: 600px;
            padding: .7rem 1em;
            height: 2.5rem;
            font-size: 1.1rem;
            border-radius: 2px 0 0 2px;
            border-color: #ccc;
            overflow: hidden;
        }
        .search-button {
            @include button-variant(white,
                $meta-golden,
                $meta-golden);
            padding-top: .5rem;
            padding-bottom: .5rem;
            width: 100%;
            height: 2.5rem;
            border-radius: 0 2px 2px 0;
            font-size: 1.1rem;
        }
    }
    .down-icon {
        position: absolute;
        left: 50%;
        margin-left: -.725rem;
        top: auto;
        bottom: 8%;
        font-size: 30px;
        font-size: 1.5rem;
        color: white;
        animation: jump .7s ease-out infinite alternate;
    }
    .recommend {
        h1 {
            margin: 100px 0 60px;
        }
        ul {
            padding-left: 0;
            list-style: none;
        }
        &-inner {
            margin: 0 auto 40px;
            max-width: 1000px;
            width: 100%;
        }
        .media {
            margin-top: 30px;
        }
        .media-title {
            padding: 4px 10px;
            width: 100px;
            background: #999;
            color: white;
            font-size: 18px;
        }
        .media-body {
            text-align: right;
            line-height: 33px;
            a {
                font-size: 12px;
            }
        }
        .left {
            margin-bottom: 40px;
            text-align: left;
            color: white;
            &-inner {
                padding: 30px 15px 10px;
                border-radius: 4px;
                background-color: #f5a623;
                > a {
                    color: white;
                }
            }
            &-img {
                margin-top: 25px;
                width: 100%;
                height: 185px;
                background: url('../images/index/recommend/2025.png') no-repeat center;
                background-size: contain;
                transition: transform .3s ease-in-out;
                &:hover {
                    transform: scale(1.2);
                }
            }
            h3 {
                margin-top: 0;
                text-align: center;
            }
            p {
                margin: 0 auto;
                width: 272px;
                @include overflow-ellipse;
            }
            .important-technology {
                &-list {
                    padding: 10px 0 0;
                }
                &-item {
                    margin: 15px 0;
                    a {
                        display: block;
                        padding-left: 10px;
                        height: 50px;
                        line-height: 50px;
                        background-color: rgba(255, 255, 255, .35);
                        border-radius: 4px;
                        color: white;
                        &:hover {
                            font-weight: bold;
                            background-color: rgba(255, 255, 255, .15);
                        }
                    }
                }
            }
            p > a {
                padding-top: 4px;
                padding-bottom: 4px;
                width: 160px;
                border-radius: 4px;
                font-size: 18px;
            }
        }
        .middle {
            margin-bottom: 40px;
            &-img {
                display: block;
                padding: 10px 20px;
                height: 200px;
                border-radius: 4px;
                background: url('../images/index/recommend/foriegn.jpg') no-repeat center;
                background-size: 120% 120%;
                text-align: left;
                color: white;
                @include hover-large;
            }
            .newest-technology {
                &-list {
                    margin-bottom: 0;
                    height: 363px;
                    text-align: left;
                }
                &-item {
                    margin: 15px 0;
                    a {
                        display: block;
                        width: 100%;
                        @include overflow-ellipse;
                    }
                }
            }
        }
        .right {
            margin-bottom: 40px;
            &-img {
                display: block;
                padding: 10px 20px;
                height: 200px;
                border-radius: 4px;
                background: url('../images/index/recommend/plastic.jpg') no-repeat center;
                background-size: 120% 120%;
                text-align: left;
                color: white;
                @include hover-large;
            }
            .talent {
                &-list {
                    padding-right: 0;
                    margin-top: 30px;
                    margin-bottom: 10px;
                    height: 103px;
                }
                &-item {
                    float: left;
                    width: 33.3%;
                    text-align: center;
                    a {
                        display: inline-block;
                        width: 100px;
                        height: 100px;
                        background-size: cover;
                        background-repeat: no-repeat;
                    }
                }
            }
            .institute {
                margin-top: 44px;
                padding: 20px 10px;
                height: 180px;
                background: #f4f8fd;
                > a {
                    display: block;
                    color: #666;
                    > p {
                        font-size: 16px;
                    }
                }
                h4 {
                    display: inline-block;
                    height: 24px;
                    border-bottom: 1px solid #666;
                }
                .spot {
                    padding-top: 10px;
                }
            }
            .demand {
                &-list {
                    margin-bottom: 0;
                    height: 154px;
                    text-align: left;
                }
                &-item {
                    margin: 15px 0;
                    a {
                        display: block;
                        width: 100%;
                        @include overflow-ellipse;
                    }
                }
            }
        }
    }
    .together {
        &-img {
            height: 500px;
            background-size: contain;
            background-repeat: no-repeat;
            background-position: 50% 50%;
        }
    }
    .advantages {
        h1 {
            margin-bottom: 60px;
        }
        .image,
        .words {
            padding: 0;
        }
        .image > div {
            height: 100%;
            background: url('../images/index/oversea-bg.jpg');
            background-size: cover;
        }
        .words {
            .advantage-text {
                &-container {
                    display: inline-table !important;
                    height: 100%;
                }
                display: table-cell;
                vertical-align: middle;
                padding: 0 20%;
                text-align: center;
                p {
                    text-align: left;
                }
                a {
                    margin: 0 auto 0;
                    padding: 0 8px;
                    display: inline-block;
                    height: 24px;
                    font-size: 14px;
                    color: $dodger-blue;
                    border-bottom: 1px solid $dodger-blue;
                }
            }
        }
    }
    .scale {
        margin-bottom: 40px;
        max-width: 1000px;
        &-inner {
            margin: 0 auto;
            width: 100%;
        }
        &-list {
            display: inline-block;
            padding-left: 0;
            list-style: none;
        }
        &-item {
            &-container {
                margin: 0 0 3rem;
                padding: 0 2rem;
                text-align: center;

                p {
                    height: 80px;
                }

                img {
                    padding: 10%;
                    margin: auto;
                }
            }
        }
    }
    .cases {
        h1 {
            margin: 80px 0;
        }
        .case {
            &-list {
                margin: 0 auto;
                max-width: 1000px;
                width: 100%;
            }
            &-item {
                position: relative;
                margin-bottom: 80px;
                height: 400px;
                background-image: url('../images/index/oversea-bg.jpg');
                background-size: cover;
                background-repeat: no-repeat;
                background-position: center;
                &:hover {
                    .case-item-caption {
                        transition: height .2s ease-in-out;
                        height: 100%;
                        > div {
                            margin-top: 50%;
                        }
                    }
                }
            }
            &-item-caption {
                display: inline-block;
                position: absolute;
                left: 0;
                bottom: 0;
                padding: 20px;
                width: 100%;
                background: rgba(0, 0, 0, .6);
                text-align: left;
                color: white;
                h4 {
                    margin: 0 0 5px;
                    line-height: 1.2em;
                }
                p {
                    margin-bottom: 0;
                }
            }
        }
    }
    .guarantee {
        background: #f8f8f8;
        h1 {
            margin: 80px 0 60px;
        }
        &-inner {
            margin: 0 auto 20px;
            max-width: 1000px;
            width: 100%;
        }
        &-list {
            display: inline-block;
        }
        &-item {
            padding: 0 15px 40px;
            height: 192px;
            &-inner {
                margin: 0 auto;
            }
            &-title {
                position: relative;
                display: block;
                span:last-child {
                    position: relative;
                    padding: 0 4px;
                    line-height: 1.2;
                    display: inline-block;
                    background: #f8f8f8;
                    color: $dodger-blue;
                }
                .bg {
                    position: absolute;
                    top: 6px;
                    left: 50%;
                    margin-left: -35px;
                    width: 70px;
                    height: 28px;
                    border-radius: 30px;
                    border: 2px solid $dodger-blue;
                }
            }
            &-caption {
                text-align: left;
            }
        }
    }
    .user-say {
        padding: 0;
        position: relative;
        color: #fff;
        text-align: left;
        .carousel {
            height: 500px;
        }
        .user-say-content {
            position: absolute;
            top: 20%;
            left: 10%;
            width: 400px;
        }
        @media (max-width: $screen-xs-max) {
            & .user-say-content {
                left: 5%;
                width: 300px;
            }
        }
        p {
            text-align: left;
            text-indent: 2em;
            letter-spacing: .2em;
            font-size: 16px;
        }
        p::before {
            content: '';
            position: relative;
            display: inline-block;
            outline: none;
            text-decoration: none;
            color: #fff;
            font-size: 64px;
            line-height: 0;
            top: 10px;
        }
        p::after {
            content: '';
            position: relative;
            display: inline-block;
            outline: none;
            text-decoration: none;
            color: #fff;
            font-size: 64px;
            line-height: 0;
            top: 20px;
        }
        strong {
            font-size: 16px;
        }
    }
    @media(min-width: $screen-sm-min) {
        h1 {
            font-size: 40px;
        }
        .logo {
            height: 600px;
            h1 {
                margin-bottom: 50px;
            }
        }
        .together {
            &-img {
                background-image: url('../images/index/block1-1920.png');
            }
        }
        .advantages {
            .row {
                > div:first-child {
                    text-align: right;
                }
                > div:last-child {
                    text-align: left;
                }
                &:nth-child(2) {
                    .words {
                        background: $dodger-blue-light;
                        background: $dodger-blue-lighter;
                    }
                }
                &:nth-child(4) {
                    .image {
                        background: #f7f8f8;
                    }
                }
            }
            .image,
            .words {
                height: 200px;
                &.col-sm-6 {
                    > div {
                        display: inline-block;
                        max-width: 500px;
                        width: 60%;
                    }
                }
            }
            .divider {
                color: $dodger-blue;
            }
        }
        .guarantee {
            &-item {
                &-inner {
                    width: 190px;
                }
            }
        }
    }
    @media (max-width: 1280px) and (min-width: $screen-sm-min) {
        .logo {
            height: 380px;
        }
        .together {
            &-img {
                background-image: url('../images/index/block1-1200.png');
            }
        }
    }
    @media(max-width: $screen-xs-max) {
        h1 {
            font-size: 30px;
        }
        .logo {
            height: 300px;
            h1 {
                font-size: 40px;
            }
        }
        .together {
            height: auto;
            &-img {
                height: 300px;
                background-image: url('../images/index/block1-768.png');
            }
        }
        .advantages {
            h1 {
                padding: 0 40px;
            }
            .row {
                position: relative;
                margin-top: 0;
                &:nth-child(3) {
                    .advantage-text-container {
                        background: rgba(31, 134, 237, .7);
                    }
                }
            }
            .image,
            .words {
                height: 200px;
                &.col-xs-12 {
                    &:nth-child(odd) {
                        position: absolute;
                    }
                }
            }
            .image {
                z-index: 1;
            }
            .words {
                background: none;
                z-index: 2;
                .advantage-text {
                    padding: 0 40px;
                    color: white;
                    a {
                        color: $meta-golden;
                        border-color: $meta-golden;
                    }
                    &-container {
                        background: rgba(93, 93, 93, .7);
                    }
                }
            }
            .divider {
                color: $meta-golden;
            }
        }
        .scale {
            margin-top: 50px;
            h1 {
                margin-bottom: 30px;
                padding: 0 50px;
            }
            &-list {
                width: 280px;
            }
            &-item {
                width: 84px;
                height: 84px;
                border-radius: 84px;
                &-container {
                    margin-bottom: 30px;
                    padding: 0;
                }
                .spark {
                    font-size: 23px;
                }
                &-text {
                    font-size: 7.55px;
                }
            }
        }
        .cases {
            .case {
                &-item {
                    margin-bottom: 20px;
                    &-caption {
                        h4 {
                            font-size: 16px;
                        }
                    }
                }
            }
        }
        .guarantee {
            &-item {
                width: 50%;
                &-title {
                    .bg {
                        left: 50%;
                        margin-left: -35px;
                    }
                }
            }
        }
    }
    .shadow-carousel {
        > .item {
            display: none;
            position: relative;
            opacity: 0;
            //@include transition(.6s ease-in-out left);
            // Account for jankitude on images
            > img,
            > a > img {
                @include img-responsive;
                line-height: 1;
            }
            -webkit-transition: opacity .3s;
            -moz-transition: opacity .3s;
            -ms-transition: opacity .3s;
            -o-transition: opacity .3s;
            transition: opacity .3s;
            // WebKit CSS3 transforms for supported devices
            //@media all and (transform-3d), (-webkit-transform-3d) {
            //    //@include transition-transform(0.6s ease-in-out);
            //    @include backface-visibility(hidden);
            //    //@include perspective(1000px);
            //
            //    &.next,
            //    &.active.right {
            //        //@include translate3d(100%, 0, 0);
            //        opacity: .5;
            //        left: 0;
            //    }
            //    &.prev,
            //    &.active.left {
            //        //@include translate3d(-100%, 0, 0);
            //        opacity: .5;
            //        left: 0;
            //    }
            //    &.next.left,
            //    &.prev.right,
            //    &.active {
            //        //@include translate3d(0, 0, 0);
            //        opacity: 1;
            //        left: 0;
            //    }
            //}
        }
        > .active,
        > .next,
        > .prev {
            display: block;
        }
        > .active {
            left: 0;
            opacity: 1;
            display: block;
        }
        > .next,
        > .prev {
            position: absolute;
            top: 0;
            width: 100%;
        }
        > .next {
            //left: 100%;
        }
        > .prev {
            //left: -100%;
            left: 0;
        }
        > .next.left,
        > .prev.right {
            left: 0;
            opacity: 1;
        }
        > .active.left {
            //left: -100%;
            left: 0;
            opacity: 0;
            display: block;
        }
        > .active.right {
            //left: 100%;
            left: 0;
            opacity: 0;
            display: block;
        }
    }
}
